package basic_practice_1013;

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;
/**
 * @author MemoryC
 * */
public class Main {

	public static void main(String[] args) {

		Scanner scanner=new Scanner(System.in);
		List<Integer>Primes=new ArrayList<>();
		Primes.add(2);
		Primes.add(3);
		Primes.add(5);
		Primes.add(7);
		
		while(scanner.hasNext()) {
			int a=scanner.nextInt();
			String output=a+" = ";
			boolean isFirstFactor=true;
			
			if(Math.sqrt(a)>Primes.get(Primes.size()-1)) {
				for(int i=Primes.get(Primes.size()-1)+1;i<=Math.sqrt(a);i++) {
					boolean isPrime=true;
					for(int prime:Primes) {
						if(i%prime==0) {
							isPrime=false;
							break;
						}
					}
					if(isPrime) {
						Primes.add(i);
					}
				}
			}
			
			for(int prime:Primes) {
				while(a%prime==0) {
					if(isFirstFactor) {
						output+=prime;
						isFirstFactor=false;
					}else {
						output+=" * "+prime;
					}
//					output+=isFirstFactor?prime:(" * "+prime);
					a/=prime;
				}
				if(Primes.contains(a)) {
					if(isFirstFactor) {
						output+=a;
						isFirstFactor=false;
					}else {
						output+=" * "+a;
					}
					a=1;
					break;
				}
			}
			if(a>1) {
				if(isFirstFactor) {
					output+=a;
					isFirstFactor=false;
				}else {
					output+=" * "+a;
				}
			}
			
//			if(output.length()>output.indexOf(" * ")+3) {
//
//				output=output.substring(0, output.indexOf(" * "))+output.substring(output.indexOf(" * ")+3);
//			}
			System.out.println(output);
		}
		scanner.close();
	}
	
}

class Main2 {

	public static void main(String[] args) {

		Scanner scanner=new Scanner(System.in);
		List<Integer>Primes=new ArrayList<>();
		Primes.add(2);
		Primes.add(3);
		Primes.add(5);
		Primes.add(7);
		
		
		List<Integer>facters=new ArrayList<>();
		while(scanner.hasNext()) {
			int a=scanner.nextInt();
			String output=a+" = ";
			facters.clear();
			
			if(Math.sqrt(a)>Primes.get(Primes.size()-1)) {
				for(int i=Primes.get(Primes.size()-1)+1;i<=Math.sqrt(a);i++) {
					boolean isPrime=true;
					for(int prime:Primes) {
						if(i%prime==0) {
							isPrime=false;
							break;
						}
					}
					if(isPrime) {
						Primes.add(i);
					}
				}
			}
			
			for(int prime:Primes) {
				while(a%prime==0) {
					facters.add(prime);
					a/=prime;
				}
				if(Primes.contains(a)) {
					facters.add(a);
					a=1;
					break;
				}
			}
			if(a>1) {
				facters.add(a);
			}
			output+=""+facters.get(0);
			for(int i=1;i<facters.size();i++) {
				output+=" * "+facters.get(i);
			}
			System.out.println(output);
		}
		scanner.close();
	}
	
}